package QueueDemo;

import java.util.Arrays;

public class LoopQueue<E> implements Queue<E> {
	
	private E[] data;
	private int front,tail;
	private int size;
	
	public LoopQueue(int capacity) {
		data = (E[])new Object[capacity];
		front=0;
		tail=0;
		size=0;
	}
	public LoopQueue() {
		this(10);
	}
	public int getSize() {
		return size;
	}
	public int getCapacity() {
		return data.length-1;
	}
	
	@Override
	public boolean isEmpty() {
		return front==tail;
	}
	@Override
	public void dequeue(E e) {
		
	}
	@Override
	public E dequeue() {
		return null;
	}
	
	@Override
	public E getFront() {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public String toString() {
		return "LoopQueue [data=" + Arrays.toString(data) + ", front=" + front + ", tail=" + tail + ", size=" + size
				+ "]";
	}
	

	
}
